#define  _CRT_SECURE_NO_WARNINGS

#include<iostream>

using namespace std;

template<typename T>
void Swap(T& left, T& right)
{
	T temp = left;
	left = right;
	right = temp;
}

int main()
{
	int a = 1, b = 2;
	Swap(a, b);

	double m = 1.1, n = 2.2;
	Swap(m, n);

	cout << a << ' ' << b << endl;
	cout << m << ' ' << n << endl;

	return 0;
}